package com.xpgk.mvc.statistic.monthTotalStatistic;

import java.util.Date;

import com.jfinal.log.Log;
import com.xpgk.annotation.Table;
import com.xpgk.mvc.base.BaseModel;
import com.xpgk.mvc.bentryRegister.Customer;
import com.xpgk.tools.ToolDateTime;

/**
 * 月综合查询model
 */
@SuppressWarnings("unused")
@Table(tableName = MonthTotal.table_name)
public class MonthTotal extends  BaseModel<MonthTotal>{
	
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2998826561243450854L;
	
	private static final Log log = Log.getLog(MonthTotal.class);
	public static final MonthTotal dao = new MonthTotal().dao();
	
	
	/**
	 * 表名称
	 */
	public static final String table_name = "sb_customer_total_month";


	/**
	 * 字段描述：ids 字段类型：character varying 长度：32
	 */
	public static final String column_ids = "ids";
	/**
	 * 字段描述：机构ids 字段类型：character varying 长度：32
	 */
	public static final String column_organids = "organids";

	/**
	 * 字段描述：日期    
	 */
	public static final String column_date = "date";

	/**
	 * 字段描述：新顾客咨询人数 
	 */
	public static final String column_zxrs = "zxrs";
	
	/**
	 * 字段描述：新顾客总成交人数
	 */
	public static final String column_cjrs = "cjrs";
	
	/**
	 * 字段描述：新顾客转介绍成交人数     
	 */
	public static final String column_zjscjrs = "zjscjrs";
	
	/**
	 * 字段描述：新顾客宣传成交人数         
	 */
	public static final String column_xccjrs = "xccjrs";

	/**
	 * 字段描述：新顾客自然进店成交人数     
	 */
	public static final String column_zrjdcjrs = "zrjdcjrs";

	/**
	 * 字段描述：新顾客成交率       
	 */
	public static final String column_xgkCjl = "xgkCjl";
	/**
	 * 字段描述：新顾客单疗程 数     
	 */
	public static final String column_xgkDlcs = "xgkDlcs";
	/**
	 * 字段描述：新顾客单疗程金额
	 */
	public static final String column_xgkDlcje = "xgkDlcje";

	/**
	 * 字段描述：新顾客疗程数       
	 */
	public static final String column_xgkLcs = "xgkLcs";

	/**
	 * 字段描述：新顾客疗程金额
	 */
	public static final String column_xgkLcje = "xgkLcje";
	
	/**
	 * 字段描述：新顾客应减斤数
	 */
	public static final String column_xgkYjjs = "xgkYjjs";
	
	/**
	 * 字段描述：当年当月新顾客实减斤数
	 */
	public static final String column_dndyxgksjjs = "dndyxgksjjs";
	
	
	/**
	 * 字段描述：应到店人数
	 */
	public static final String column_yddrs = "yddrs";
	
	/**
	 * 字段描述：实到店人数
	 */
	public static final String column_sddrs = "sddrs";
	
	/**
	 * 字段描述：未到店人数
	 */
	public static final String column_wddrs = "wddrs";
	
	/**
	 * 字段描述：服务人数
	 */
	public static final String column_fwrs = "fwrs";
	
	/**
	 * 字段描述：服务次数
	 */
	public static final String column_fwcs = "fwcs";
	/**
	 * 字段描述：掉秤人数
	 */
	public static final String column_dcrs = "dcrs";
	
	/**
	 * 字段描述：涨秤人数
	 */
	public static final String column_zcrs = "zcrs";
	/**
	 * 字段描述：平秤人数
	 */
	public static final String column_pcrs = "pcrs";
	/**
	 * 字段描述：掉秤人数占比
	 */
	public static final String column_dcrszb = "dcrszb";
	/**
	 * 字段描述：掉秤斤数
	 */
	public static final String column_dcjs = "dcjs";
	/**
	 * 字段描述：涨称斤数
	 */
	public static final String column_zcjs = "zcjs";
	/**
	 * 字段描述：达标人数
	 */
	public static final String column_dbrs = "dbrs";
	/**
	 * 字段描述：使用产品人数
	 */
	public static final String column_sycprs = "sycprs";
	/**
	 * 字段描述：使用产品人户占比
	 */
	public static final String column_sycprszb = "sycprszb";
	/**
	 * 字段描述：紧致清润洁面膏销售数量
	 */
	public static final String column_HF001SalNum = "HF001SalNum";
	/**
	 * 字段描述：紧致清润洁面膏销售金额
	 */
	public static final String column_HF001SalPrice = "HF001SalPrice";
	/**
	 * 字段描述：换能新生紧肤水销售金额
	 */
	public static final String column_HF002SalNum = "HF002SalNum";
	/**
	 * 字段描述：换能新生紧肤水销售金额
	 */
	public static final String column_HF002SalPrice = "HF002SalPrice";
	/**
	 * 字段描述：焕能紧肤润体乳销售数量
	 */
	public static final String column_HF003SalNum = "HF003SalNum";
	/**
	 * 字段描述：焕能紧肤润体乳销售金额
	 */
	public static final String column_HF003SalPrice = "HF003SalPrice";
	/**
	 * 字段描述：焕能抗皱紧致乳霜销售数量
	 */
	public static final String column_HF004SalNum = "HF004SalNum";
	/**
	 * 字段描述：焕能抗皱紧致乳霜销售金额
	 */
	public static final String column_HF004SalPrice = "HF004SalPrice";
	/**
	 * 字段描述：焕能精华液销售数量
	 */
	public static final String column_HF005SalNum = "HF005SalNum";
	/**
	 * 字段描述：焕能精华液销售金额
	 */
	public static final String column_HF005SalPrice = "HF005SalPrice";
	/**
	 * 字段描述：泰和三清销售数量
	 */
	public static final String column_HF011SalNum = "HF011SalNum";
	/**
	 * 字段描述：泰和三清销售金额
	 */
	public static final String column_HF011SalPrice = "HF011SalPrice";
	/**
	 * 字段描述：本草焕能紧肤精油销售数量
	 */
	public static final String column_SS001SalNum = "SS001SalNum";
	/**
	 * 字段描述：本草焕能紧肤精油销售金额
	 */
	public static final String column_SS001SalPrice = "SS001SalPrice";
	/**
	 * 字段描述：本草焕能紧肤膏销售数量
	 */
	public static final String column_SS002SalNum = "SS002SalNum";
	/**
	 * 字段描述：本草焕能紧肤膏销售金额
	 */
	public static final String column_SS002SalPrice = "SS002SalPrice";
	/**
	 * 字段描述：单疗程总数
	 */
	public static final String column_LC002SalNum = "LC002SalNum";
	/**
	 * 字段描述：单疗程总金额
	 */
	public static final String column_LC002SalPrice = "LC002SalPrice";
	/**
	 * 字段描述：标准疗程总数
	 */
	public static final String column_LC001SalNum = "LC001SalNum";
	/**
	 * 字段描述：标准疗程总金额
	 */
	public static final String column_LC001SalPrice = "LC001SalPrice";
	/**
	 * 字段描述：一疗程带售后销售总数
	 */
	public static final String column_LC003SalNum = "LC003SalNum";
	/**
	 * 字段描述：一疗程带售后销售金额
	 */
	public static final String column_LC003SalPrice = "LC003SalPrice";
	/**
	 * 字段描述：药贴数量
	 */
	public static final String column_YT001SalNum = "YT001SalNum";
	/**
	 * 字段描述：药贴总金额
	 */
	public static final String column_YT001SalPrice = "YT001SalPrice";
	/**
	 * 字段描述：减重总销售额
	 */
	public static final String column_jzzxse = "jzzxse";
	/**
	 * 字段描述：销售总额
	 */
	public static final String column_priceTotal = "priceTotal";
	
	
	/**
	 * 月综合select
	 */
	public static final String sqlId_splitPageSelect = "sys.monthTotalStatistic.splitPageSelect";
	
	/**
	 * 月综合from
	 */
	public static final String sqlId_splitPageFrom = "sys.monthTotalStatistic.splitPageFrom";
	
	/**
	 * 月综合select
	 */
	public static final String sqlId_getMonthTotalSelect = "sys.monthTotalStatistic.getMonthTotalSelect";
	
	/**
	 * 月综合from
	 */
	public static final String sqlId_getMonthTotalForm = "sys.monthTotalStatistic.getMonthTotalForm";
	
	/**
	 * 年综合select
	 */
	public static final String sqlId_getYearTotalSelect = "sys.monthTotalStatistic.getYearTotalSelect";
	
	/**
	 * 年综合from
	 */
	public static final String sqlId_getYearTotalForm = "sys.monthTotalStatistic.getYearTotalForm";
	
	/**
	 * 
	 */
	public static final String sqlId_getMonthTotal = "sys.monthTotalStatistic.getmonthTotal";
	/**
	 * 月综合目前到第几月
	 */
	public static final String sqlId_month = "sys.monthTotalStatistic.month";
	
	/**
	 * 月综合查询
	 */
	public static final String sqlId_getmonthTotalList = "sys.monthTotalStatistic.getmonthTotalList";
	
	
	/**
	 * 月综合查询(片区经理)
	 */
	public static final String sqlId_getmonthTotalListPQJL = "sys.monthTotalStatistic.getmonthTotalListPQJL";
	
	
	/**
	 * 月综合查询一个月
	 */
	public static final String sqlId_getOnemonthTotalList = "sys.monthTotalStatistic.getOnemonthTotalList";
	
	
	/**
	 * 月综合查询一个月（片区经理）
	 */
	public static final String sqlId_getOnemonthTotalListPQJL = "sys.monthTotalStatistic.getOnemonthTotalListPQJL";
	
	
	/**
	 * 总部月综合查询
	 */
	public static final String sqlId_zbgetmonthTotalList = "sys.monthTotalStatistic.zbgetmonthTotalList";
	
	/**
	 * 大区经理月综合查询
	 */
	public static final String sqlId_dqjlgetmonthTotalList = "sys.monthTotalStatistic.dqjlgetmonthTotalList";
	
	
	/**
	 * 总部月综合查询（详情）
	 */
	public static final String sqlId_zbgetmonthTotalListInfo = "sys.monthTotalStatistic.zbgetmonthTotalListInfo";
	
	
	/**
	 * 总部月综合查询（大区经理）
	 */
	public static final String sqlId_zbgetmonthTotalListDQJL = "sys.monthTotalStatistic.zbgetmonthTotalListDQJL";
	
	
	
	/**
	 * 总部月综合查询（大区经理详情）
	 */
	public static final String sqlId_zbgetmonthTotalListDQJLInfo = "sys.monthTotalStatistic.zbgetmonthTotalListDQJLInfo";
	
	
	
	/**
	 * 总部月综合查询一个月
	 */
	public static final String sqlId_zbgetOnemonthTotalList = "sys.monthTotalStatistic.zbgetOnemonthTotalList";
	
	
	/**
	 * 大区经理月综合查询一个月
	 */
	public static final String sqlId_dqjlgetOnemonthTotalList = "sys.monthTotalStatistic.dqjlgetOnemonthTotalList";
	
	
	/**
	 * 总部月综合查询一个月（详情）
	 */
	public static final String sqlId_zbgetOnemonthTotalListInfo = "sys.monthTotalStatistic.zbgetOnemonthTotalListInfo";
	
	
	/**
	 * 总部月综合查询一个月（大区经理）
	 */
	public static final String sqlId_zbgetOnemonthTotalListDQJL = "sys.monthTotalStatistic.zbgetOnemonthTotalListDQJL";
	
	/**
	 * 总部月综合查询一个月（大区经理详情）
	 */
	public static final String sqlId_zbgetOnemonthTotalListDQJLInfo = "sys.monthTotalStatistic.zbgetOnemonthTotalListDQJLInfo";
	
	/**通过机构ids,日期获取日护理综合查询
	 * 
	 * @param organids
	 * @param date
	 * @return
	 */
	public  MonthTotal  getMonthTotal(String organids,Date date)
	{
		String  oldCusSerTotalsql = "SELECT  * FROM  sb_customer_total_month  WHERE  organids = ?  AND  date = ?";
		MonthTotal  dnt = MonthTotal.dao.findFirst(oldCusSerTotalsql,organids,ToolDateTime.format(date, ToolDateTime.pattern_ym));
		return  dnt;
	}
	
	


}
